package com.itheima.health.job;


import com.itheima.health.service.OrderSettingService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@JobHandler(value = "heima.orderSetting.clean.dateTable.job") //  web配置JobHandler的名称
@Component
public class CleanOrderSettingJob extends IJobHandler {
    @Resource
    private OrderSettingService orderSettingService;

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        System.out.println("OrderSetting已清理");
        orderSettingService.cleanOrderSettingJob();
        return SUCCESS;
    }
}
